package com.example.aigc_education.integration.emuns;

import lombok.Getter;

/**
 * @author itJackson
 */

@Getter
public enum CozeWorkflowTypeV2 {

    GEN_QZ("生成试题","quizzes", "7470536779109449743"),
    GEN_FC("生成抽记卡","flashcards","7470557905802117172"),

    AI_TEACHER("AI老师","ai_teacher", "7481364035108388876"),

    // todo: AI搜索网络资源在coze平台还未升级至v2版本
    STUDY_PLAN("生成学习计划","study_plan", "7502071706182369291"),
    WEB_SEARCH("AI搜索网络资源","web_search", "7433399261227106345");

    private final String name;
    private final String value;
    private final String workflowId;


    CozeWorkflowTypeV2(String name, String value, String workflowId) {
        this.name = name;
        this.value = value;
        this.workflowId = workflowId;
    }

    public static CozeWorkflowTypeV2 fromValue(String value) {
        for (CozeWorkflowTypeV2 workflow : CozeWorkflowTypeV2.values()) {
            if (workflow.getValue().equals(value)) {
                return workflow;
            }
        }
        throw new IllegalArgumentException("No enum constant with value " + value);
    }
}
